From: Carlos Garnacho Date: Thu, 13 Dec 2018 19:30:22 +0000 (+0100) Subject: automountManager: Port to MetaSoundPlayer for emitting sounds X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9a35c990;p=gnome-shell.git automountManager: Port to MetaSoundPlayer for emitting sounds Move away from ShellGlobal API, which is too tightly coupled to libcanberra-gtk. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327 --- diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js index a64fc0d35..579c8a6b3 100644 --- a/js/ui/components/automountManager.js +++ b/js/ui/components/automountManager.js @@ -87,9 +87,10 @@ var AutomountManager = new Lang.Class({ if (!this._session.SessionIsActive) return; - global.play_theme_sound(0, 'device-added-media', - _("External drive connected"), - null); + let player = global.display.get_sound_player(); + player.play_from_theme('device-added-media', + _("External drive connected"), + null); }, _onDriveDisconnected() { @@ -98,9 +99,10 @@ var AutomountManager = new Lang.Class({ if (!this._session.SessionIsActive) return; - global.play_theme_sound(0, 'device-removed-media', - _("External drive disconnected"), - null); + let sound = global.display.get_sound(); + sound.play_from_theme('device-removed-media', + _("External drive disconnected"), + null); }, _onDriveEjectButton(monitor, drive) {